//
//  CFigureDoc.m
//  FavDraw
//
//  Created by lang honglin on 11-2-26.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "CFigureDoc.h"
#import "CFigureLayer.h"


@implementation CFigureDoc

-(CFigureDoc*)initDoc {
	
	if (self = [super init] ) {
	
		layerArray = [[NSMutableArray alloc] init ];
		currentLayer = [[CFigureLayer alloc] initWithName:@"layer0"];
		[layerArray addObject:currentLayer];
		
	}
	return self;
	
}

-(void)freeAllLayer {
	
	
}

-(void)AddFigureObj:(ShapeType)shapetype ObjBoundRect:(CGRect)boundRect {
	
	NSLog(@"FigDoc AddFigureObj");
	[currentLayer AddFigureObj:shapetype ObjBoundRect:boundRect];	
}

- (void)dealloc {
	
    [super dealloc];
	[layerArray release];
}

@end
